<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of polylineSelfIntersections</title>
  <meta name="keywords" content="polylineSelfIntersections">
  <meta name="description" content="POLYLINESELFINTERSECTIONS  find self-intersections points of a polyline">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="#">imael</a> &gt; <a href="#">geom2d</a> &gt; polylineSelfIntersections.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for .\imael\geom2d&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>polylineSelfIntersections
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>POLYLINESELFINTERSECTIONS  find self-intersections points of a polyline</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function varargout = polylineSelfIntersections(poly, varargin) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment">POLYLINESELFINTERSECTIONS  find self-intersections points of a polyline

   PTS = polylineSelfIntersections(POLY);
   Return the position of self intersection points

   [PTS POS1 POS2] = polylineSelfIntersections(POLY);
   Also return the 2 positions of each intersection point (the position
   when meeting point for first time, then position when meeting point
   for the second time).

   Example
       % use a gamma-shaped polyline
       poly = [0 0;0 10;20 10;20 20;10 20;10 0];
       polylineSelfIntersections(poly)
       ans = 
           10 10

       % use a 'S'-shaped polyline
       poly = [10 0;0 0;0 10;20 10;20 20;10 20];
       polylineSelfIntersections(poly)
       ans = 
           10 10

   See also
   <a href="polylines2d.html" class="code" title="function polylines2d(varargin)">polylines2d</a>, <a href="polygonSelfIntersections.html" class="code" title="function varargout = polygonSelfIntersections(poly, varargin)">polygonSelfIntersections</a>

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2009-06-15,    using Matlab 7.7.0.471 (R2008b)
 Copyright 2009 INRA - Cepia Software Platform.
 Licensed under the terms of the LGPL, see the file &quot;license.txt&quot;</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="distancePoints.html" class="code" title="function dist = distancePoints(p1, p2, varargin)">distancePoints</a>	DISTANCEPOINTS compute distance between two points</li><li><a href="edgePosition.html" class="code" title="function d = edgePosition(point, edge)">edgePosition</a>	EDGEPOSITION return position of a point on an edge</li><li><a href="intersectEdges.html" class="code" title="function point = intersectEdges(edge1, edge2)">intersectEdges</a>	INTERSECTEDGES return all intersections points of N edges in 2D</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="polygonSelfIntersections.html" class="code" title="function varargout = polygonSelfIntersections(poly, varargin)">polygonSelfIntersections</a>	POLYGONSELFINTERSECTIONS  find common points between 2 polygons</li></ul>
<!-- crossreference -->



<hr><address>Generated on Fri 05-Feb-2010 11:20:41 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>